<div>
    <div class="ui form" ng-class="{'loading': loading}">
        <div class="field" ng-if="ctl.optionsEnabled.saveLocation">
            <div class="ui left icon input">
                <i class="save icon"></i>
                <input data-action="save-location" id="upload-options-savelocation" placeholder="Download location" type="text" ng-model="options.saveLocation">
            </div>
        </div>

        <div class="field" ng-if="ctl.optionsEnabled.renameTorrent">
            <div class="ui left icon input">
                <i class="tag icon"></i>
                <input data-action="rename-torrent" id="upload-options-renametorrent" type="text" placeholder="Rename torrent" ng-model="options.renameTorrent">
            </div>
        </div>

        <div class="fields" ng-if="ctl.optionsEnabled.category">
            <div class="field twelve wide">
                <dropdown title="Label" id="upload-options-label" class="fluid" ng-model="options.category">
                    <dropdown-group ng-repeat="label in labels" data-label="{{ label }}" title="label" value="label">
                    {{ label }}
                    </dropdown-group>
                </dropdown>
            </div>
            <div class="field four wide">
                <button class="ui button fluid" ng-click="options.category = null" ng-class="{'disabled': !options.category}">
                    Clear Category
                </button>
            </div>
        </div>

        <div class="fields">
            <div class="eight wide field" ng-if="ctl.optionsEnabled.startTorrent">
                <toggle data-action="start-torrent" ng-model="options.startTorrent">
                    Start torrent
                </toggle>
            </div>

            <div class="eight wide field" ng-if="ctl.optionsEnabled.skipCheck">
                <toggle data-action="skip-check" ng-model="options.skipCheck">
                    Skip hash check
                </toggle>
            </div>

            <div class="eight wide field" ng-if="ctl.optionsEnabled.sequentialDownload">
                <toggle data-action="sequential-download" ng-model="options.sequentialDownload">
                    Sequential download
                </toggle>
            </div>

            <div class="eight wide field" ng-if="ctl.optionsEnabled.firstAndLastPiecePrio">
                <toggle data-action="first-last-piece-prio" ng-model="options.firstAndLastPiecePrio">
                    First and last piece priority
                </toggle>
            </div>
        </div>

        <div class="field" ng-if="ctl.optionsEnabled.downloadSpeedLimit || ctl.optionsEnabled.uploadSpeedLimit">
            <div class="two fields">
                <div class="field" ng-if="ctl.optionsEnabled.downloadSpeedLimit">
                    <div class="ui left icon input">
                        <i class="arrow circle down icon"></i>
                        <input id="upload-options-downloadspeedlimit" type="number" placeholder="Download speed limit (KB/s)" ng-model="options.downloadSpeedLimit">
                    </div>
                </div>
                <div class="field" ng-if="ctl.optionsEnabled.uploadSpeedLimit">
                    <div class="ui left icon input">
                        <i class="arrow circle up icon"></i>
                        <input id="upload-options-uploadspeedlimit" type="number" placeholder="Upload speed limit (KB/s)" ng-model="options.uploadSpeedLimit">
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
